﻿namespace PMS.Client
{
    using DevComponents.DotNetBar;
    using PMS.BLL;
    using PMS.Client.Controls;
    using PMS.Client.DataService;
    using PMS.Client.FrmAdmin;
    using PMS.Client.FrmBackup;
    using PMS.Client.FrmFile;
    using PMS.Client.FrmImportAndExport;
    using PMS.Client.FrmJobPosition;
    using PMS.Client.FrmJobTitle;
    using PMS.Client.FrmJobTitleType;
    using PMS.Client.FrmOrgan;
    using PMS.Client.FrmOrganBuild;
    using PMS.Client.FrmOrganLevel;
    using PMS.Client.FrmOrganRole;
    using PMS.Client.FrmOrganType;
    using PMS.Client.FrmRoleMenu;
    using PMS.Client.FrmSyslog;
    using PMS.Client.FrmUser;
    using PMS.Client.FrmUserBuild;
    using PMS.Client.FrmUserJobPosition;
    using PMS.Client.FrmUserJobTitle;
    using PMS.Client.FrmUserLeave;
    using PMS.Client.FrmUserMove;
    using PMS.Client.FrmUserPositionLevel;
    using PMS.Client.FrmUserRegist;
    using PMS.Common;
    using PMS.Model;
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Threading;
    using System.Windows.Forms;

    public class FrmMain : Office2007Form
    {
        private Form activeForm = null;
        private TreeNode activeNode = null;
        private int activeOrganID = 0;
        private int activeOrganLevelNo = 0;
        private string activeOrganName = "";
        private int activePanelIndex = 0;
        private TabPage activeTabPage = null;
        private IContainer components = null;
        private ToolStripStatusLabel lbCurrentUser;
        private ToolStripStatusLabel lbPath;
        private MenuStrip menuStrip1;
        private AuthorityOrganBLL organAuthorityBLL = new AuthorityOrganBLL();
        private OrganBLL organbll = new OrganBLL();
        private List<AuthorityOrgan> organList = null;
        private ImageList organTreeImageList;
        private StatusStrip statusStrip1;
        private System.Windows.Forms.TabControl tabControl1;
        private TabPage tabOrganBase;
        private TabPage tabOrganConfig;
        private TabPage tabOrganReport;
        private TabPage tabPositionReport;
        private TabPage tabUserJobPostion;
        private TabPage tabUserJobTitle;
        private TabPage tabUserLeave;
        private TabPage tabUserReality;
        private TabPage tabUserReport;
        private ToolStripStatusLabel toolStripStatusLabel1;
        private ToolStripStatusLabel toolStripStatusLabel2;
        private ToolStripStatusLabel toolStripStatusLabel3;
        private TreeView treeView1;
        private UCSplitContainer ucSplitContainer1;
        private ToolStripMenuItem 帮助ToolStripMenuItem;
        private ToolStripMenuItem 报表管理RToolStripMenuItem;
        private ToolStripMenuItem 编制类别设置ToolStripMenuItem;
        private ToolStripMenuItem 编制审核RToolStripMenuItem;
        private ToolStripMenuItem 打印PToolStripMenuItem;
        private ToolStripMenuItem 导入导出ToolStripMenuItem;
        private ToolStripMenuItem 定岗审核ToolStripMenuItem;
        private ToolStripMenuItem 机构编码设置ToolStripMenuItem;
        private ToolStripMenuItem 机构管理ToolStripMenuItem;
        private ToolStripMenuItem 机构级别设置ToolStripMenuItem;
        private ToolStripMenuItem 机构类别设置ToolStripMenuItem;
        private ToolStripMenuItem 机构类型设置TToolStripMenuItem;
        private ToolStripMenuItem 机构设置SToolStripMenuItem;
        private ToolStripMenuItem 机构审核ToolStripMenuItem;
        private ToolStripMenuItem 机构数据ToolStripMenuItem;
        private ToolStripMenuItem 机构数据导出ToolStripMenuItem;
        private ToolStripMenuItem 机构性质设置ToolStripMenuItem;
        private ToolStripMenuItem 基本信息修改UToolStripMenuItem;
        private ToolStripMenuItem 基础数据管理ToolStripMenuItem;
        private ToolStripMenuItem 减少审核ToolStripMenuItem;
        private ToolStripMenuItem 角色管理ToolStripMenuItem;
        private ToolStripMenuItem 权限管理AToolStripMenuItem;
        private ToolStripMenuItem 人员报表设计UToolStripMenuItem;
        private ToolStripMenuItem 人员查询FToolStripMenuItem;
        private ToolStripMenuItem 人员定岗PToolStripMenuItem;
        private ToolStripMenuItem 人员岗位设置ToolStripMenuItem;
        private ToolStripMenuItem 人员管理ToolStripMenuItem;
        private ToolStripMenuItem 人员减少LToolStripMenuItem;
        private ToolStripMenuItem 人员排序SToolStripMenuItem;
        private ToolStripMenuItem 人员任职TToolStripMenuItem;
        private ToolStripMenuItem 人员入编RToolStripMenuItem;
        private ToolStripMenuItem 人员审核ToolStripMenuItem;
        private ToolStripMenuItem 人员审核ToolStripMenuItem1;
        private ToolStripMenuItem 人员添加IToolStripMenuItem;
        private ToolStripMenuItem 人员调动DToolStripMenuItem;
        private ToolStripMenuItem 人员职位设置ToolStripMenuItem;
        private ToolStripMenuItem 任职审核ToolStripMenuItem;
        private ToolStripMenuItem 日志ToolStripMenuItem;
        private ToolStripMenuItem 删除机构DToolStripMenuItem;
        private ToolStripMenuItem 使用帮助ToolStripMenuItem;
        private ToolStripMenuItem 调动审核ToolStripMenuItem;
        private ToolStripMenuItem 文件ToolStripMenuItem;
        private ToolStripMenuItem 文件管理FToolStripMenuItem;
        private ToolStripMenuItem 系统版本VToolStripMenuItem;
        private ToolStripMenuItem 系统备份ToolStripMenuItem;
        private ToolStripMenuItem 系统管理ToolStripMenuItem;
        private ToolStripMenuItem 系统恢复RToolStripMenuItem;
        private ToolStripMenuItem 新增机构ToolStripMenuItem;
        private ToolStripMenuItem 修改机构UToolStripMenuItem;
        private ToolStripMenuItem 用户管理ToolStripMenuItem;
        private ToolStripMenuItem 用户数据导入ToolStripMenuItem;
        private ToolStripMenuItem 职称分类设置FToolStripMenuItem;
        private ToolStripMenuItem 职称设置ToolStripMenuItem;
        private ToolStripMenuItem 职务设置ToolStripMenuItem;

        public FrmMain()
        {
            FrmLoading loading = new FrmLoading();
            loading.Show();
            loading.UpdateUIEvent(15, "始终化窗体...");
            this.InitializeComponent();
            this.Text = this.Text + "  v" + Config.Version;
            this.lbCurrentUser.Text = PMS.Common.Keys.Admin.LoginName;
            loading.UpdateUIEvent(5, "始终化样式...");
            base.SetStyle(ControlStyles.DoubleBuffer | ControlStyles.AllPaintingInWmPaint | ControlStyles.UserPaint, true);
            base.UpdateStyles();
            loading.UpdateUIEvent(10, "初始化权限设置...");
            this.MenuAuthority();
            loading.UpdateUIEvent(20, "初始化机构树...");
            this.LoadOrganTree();
            this.activeTabPage = this.tabOrganReport;
            loading.UpdateUIEvent(40, "初始化综合报表...");
            this.LoadForm();
            loading.UpdateUIEvent(10, "初始化完成");
        }

        private void btnAdd4_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmUser.FrmAdd add = new PMS.Client.FrmUser.FrmAdd();
            add.ShowDialog();
            if (add.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void btnAdd6_Click(object sender, EventArgs e)
        {
        }

        private void btnDecrease4_Click(object sender, EventArgs e)
        {
            FrmSearch search = new FrmSearch();
            search.ShowDialog();
            if (search.DialogResult == DialogResult.OK)
            {
                int userID = search.User.UserID;
                if (userID < 1)
                {
                    MessageBox.Show("请选择人员！");
                }
                else
                {
                    FrmLeave leave = new FrmLeave(userID);
                    leave.ShowDialog();
                    if (leave.DialogResult == DialogResult.OK)
                    {
                        this.LoadForm();
                    }
                }
            }
        }

        private void btnDel6_Click(object sender, EventArgs e)
        {
        }

        private void btnDelete4_Click(object sender, EventArgs e)
        {
            FrmSearch search = new FrmSearch();
            search.ShowDialog();
            if (search.DialogResult == DialogResult.OK)
            {
                if (search.User.UserID < 1)
                {
                    MessageBox.Show("请选择人员！");
                }
                else
                {
                    this.LoadForm();
                }
            }
        }

        private void btnExport1_Click(object sender, EventArgs e)
        {
        }

        private void btnExport2_Click(object sender, EventArgs e)
        {
        }

        private void btnExport3_Click(object sender, EventArgs e)
        {
        }

        private void btnMove4_Click(object sender, EventArgs e)
        {
            FrmSearch search = new FrmSearch();
            search.ShowDialog();
            if (search.DialogResult == DialogResult.OK)
            {
                int userID = search.User.UserID;
                if (userID < 1)
                {
                    MessageBox.Show("请选择人员！");
                }
                else
                {
                    FrmMoveOut @out = new FrmMoveOut(userID);
                    @out.ShowDialog();
                    if (@out.DialogResult == DialogResult.OK)
                    {
                        this.LoadForm();
                    }
                }
            }
        }

        private void btnPrint4_Click(object sender, EventArgs e)
        {
        }

        private void btnSetPos4_Click(object sender, EventArgs e)
        {
            FrmSearch search = new FrmSearch();
            search.ShowDialog();
            if (search.DialogResult == DialogResult.OK)
            {
                int userID = search.User.UserID;
                if (userID < 1)
                {
                    MessageBox.Show("请选择人员！");
                }
                else if (search.User.IsOfficer != 2)
                {
                    MessageBox.Show("非事业单位人员不能定岗！");
                }
                else if (string.IsNullOrEmpty(search.User.JobPositionName1) && string.IsNullOrEmpty(search.User.JobPositionName2))
                {
                    MessageBox.Show("定岗前请先任职！");
                }
                else
                {
                    FrmPositionLevelUpdate update = new FrmPositionLevelUpdate(userID);
                    update.ShowDialog();
                    if (update.DialogResult == DialogResult.OK)
                    {
                        this.LoadForm();
                    }
                }
            }
        }

        private void btnSort4_Click(object sender, EventArgs e)
        {
            FrmSort sort = new FrmSort(this.activeOrganID);
            sort.ShowDialog();
            if (sort.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void btnUpdate2_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmUserPositionLevel.FrmUpdate update = new PMS.Client.FrmUserPositionLevel.FrmUpdate(this.activeOrganName);
            if (update.ShowDialog() == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void btnupdate3_Click(object sender, EventArgs e)
        {
            FrmUpdateCount count = new FrmUpdateCount(this.activeOrganID);
            if (count.ShowDialog() == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void btnUpdate4_Click(object sender, EventArgs e)
        {
            FrmSearch search = new FrmSearch();
            search.ShowDialog();
            if (search.DialogResult == DialogResult.OK)
            {
                int userID = search.User.UserID;
                if (userID < 1)
                {
                    MessageBox.Show("请选择人员！");
                }
                else
                {
                    FrmBaseInfoUpdate update = new FrmBaseInfoUpdate(userID);
                    update.ShowDialog();
                    if (update.DialogResult == DialogResult.OK)
                    {
                        this.LoadForm();
                    }
                }
            }
        }

        private void btnUpdate5_Click(object sender, EventArgs e)
        {
            FrmUpdateFunctions functions = new FrmUpdateFunctions(this.activeOrganID);
            functions.ShowDialog();
            if (functions.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void btnUpdate6_Click(object sender, EventArgs e)
        {
        }

        private void btnUpdateJobTitle4_Click(object sender, EventArgs e)
        {
            FrmSearch search = new FrmSearch();
            search.ShowDialog();
            if (search.DialogResult == DialogResult.OK)
            {
                int userID = search.User.UserID;
                if (userID < 1)
                {
                    MessageBox.Show("请选择人员！");
                }
                else if (string.IsNullOrEmpty(search.User.RegistTo))
                {
                    MessageBox.Show("人员未入编或入编未审核，任职之前请先入编！");
                }
                else
                {
                    FrmJobPositionUpdate update = new FrmJobPositionUpdate(userID);
                    update.ShowDialog();
                    if (update.DialogResult == DialogResult.OK)
                    {
                        this.LoadForm();
                    }
                }
            }
        }

        private void btnView6_Click(object sender, EventArgs e)
        {
        }

        private bool CheckUpdate()
        {
            PMS.Model.Update version = null;
            try
            {
                version = new DataServiceClient().GetVersion();
            }
            catch (Exception exception)
            {
                PMS.Common.Log.Write(exception.Message);
            }
            if ((version != null) && (version.Version != Config.Version))
            {
                MessageBox.Show("发现新版本，点击确定后更新！");
                Process.Start("PMS.AutoUpdate.exe");
                return false;
            }
            return true;
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void FrmMain_FormClosing(object sender, FormClosingEventArgs e)
        {
            if (MessageBox.Show("确定退出？", "退出", MessageBoxButtons.OKCancel, MessageBoxIcon.Question) != DialogResult.OK)
            {
                e.Cancel = true;
            }
        }

        private void FrmMain_Load(object sender, EventArgs e)
        {
            ThreadPool.QueueUserWorkItem(obj => this.CheckUpdate());
        }

        private void InitializeComponent()
        {
            this.components = new Container();
            ComponentResourceManager manager = new ComponentResourceManager(typeof(FrmMain));
            this.menuStrip1 = new MenuStrip();
            this.机构管理ToolStripMenuItem = new ToolStripMenuItem();
            this.新增机构ToolStripMenuItem = new ToolStripMenuItem();
            this.修改机构UToolStripMenuItem = new ToolStripMenuItem();
            this.删除机构DToolStripMenuItem = new ToolStripMenuItem();
            this.机构审核ToolStripMenuItem = new ToolStripMenuItem();
            this.机构设置SToolStripMenuItem = new ToolStripMenuItem();
            this.人员审核ToolStripMenuItem1 = new ToolStripMenuItem();
            this.人员添加IToolStripMenuItem = new ToolStripMenuItem();
            this.人员入编RToolStripMenuItem = new ToolStripMenuItem();
            this.基本信息修改UToolStripMenuItem = new ToolStripMenuItem();
            this.人员调动DToolStripMenuItem = new ToolStripMenuItem();
            this.人员任职TToolStripMenuItem = new ToolStripMenuItem();
            this.人员定岗PToolStripMenuItem = new ToolStripMenuItem();
            this.人员减少LToolStripMenuItem = new ToolStripMenuItem();
            this.人员排序SToolStripMenuItem = new ToolStripMenuItem();
            this.人员查询FToolStripMenuItem = new ToolStripMenuItem();
            this.打印PToolStripMenuItem = new ToolStripMenuItem();
            this.人员管理ToolStripMenuItem = new ToolStripMenuItem();
            this.人员审核ToolStripMenuItem = new ToolStripMenuItem();
            this.编制审核RToolStripMenuItem = new ToolStripMenuItem();
            this.任职审核ToolStripMenuItem = new ToolStripMenuItem();
            this.调动审核ToolStripMenuItem = new ToolStripMenuItem();
            this.定岗审核ToolStripMenuItem = new ToolStripMenuItem();
            this.减少审核ToolStripMenuItem = new ToolStripMenuItem();
            this.导入导出ToolStripMenuItem = new ToolStripMenuItem();
            this.机构数据ToolStripMenuItem = new ToolStripMenuItem();
            this.机构数据导出ToolStripMenuItem = new ToolStripMenuItem();
            this.文件管理FToolStripMenuItem = new ToolStripMenuItem();
            this.文件ToolStripMenuItem = new ToolStripMenuItem();
            this.报表管理RToolStripMenuItem = new ToolStripMenuItem();
            this.人员报表设计UToolStripMenuItem = new ToolStripMenuItem();
            this.基础数据管理ToolStripMenuItem = new ToolStripMenuItem();
            this.机构类型设置TToolStripMenuItem = new ToolStripMenuItem();
            this.机构类别设置ToolStripMenuItem = new ToolStripMenuItem();
            this.机构级别设置ToolStripMenuItem = new ToolStripMenuItem();
            this.机构性质设置ToolStripMenuItem = new ToolStripMenuItem();
            this.机构编码设置ToolStripMenuItem = new ToolStripMenuItem();
            this.职务设置ToolStripMenuItem = new ToolStripMenuItem();
            this.职称分类设置FToolStripMenuItem = new ToolStripMenuItem();
            this.职称设置ToolStripMenuItem = new ToolStripMenuItem();
            this.编制类别设置ToolStripMenuItem = new ToolStripMenuItem();
            this.人员职位设置ToolStripMenuItem = new ToolStripMenuItem();
            this.人员岗位设置ToolStripMenuItem = new ToolStripMenuItem();
            this.权限管理AToolStripMenuItem = new ToolStripMenuItem();
            this.用户管理ToolStripMenuItem = new ToolStripMenuItem();
            this.角色管理ToolStripMenuItem = new ToolStripMenuItem();
            this.系统管理ToolStripMenuItem = new ToolStripMenuItem();
            this.日志ToolStripMenuItem = new ToolStripMenuItem();
            this.系统备份ToolStripMenuItem = new ToolStripMenuItem();
            this.系统恢复RToolStripMenuItem = new ToolStripMenuItem();
            this.帮助ToolStripMenuItem = new ToolStripMenuItem();
            this.使用帮助ToolStripMenuItem = new ToolStripMenuItem();
            this.系统版本VToolStripMenuItem = new ToolStripMenuItem();
            this.statusStrip1 = new StatusStrip();
            this.toolStripStatusLabel1 = new ToolStripStatusLabel();
            this.lbCurrentUser = new ToolStripStatusLabel();
            this.toolStripStatusLabel3 = new ToolStripStatusLabel();
            this.toolStripStatusLabel2 = new ToolStripStatusLabel();
            this.lbPath = new ToolStripStatusLabel();
            this.organTreeImageList = new ImageList(this.components);
            this.ucSplitContainer1 = new UCSplitContainer();
            this.treeView1 = new TreeView();
            this.tabControl1 = new System.Windows.Forms.TabControl();
            this.tabOrganReport = new TabPage();
            this.tabPositionReport = new TabPage();
            this.tabOrganConfig = new TabPage();
            this.tabOrganBase = new TabPage();
            this.tabUserReport = new TabPage();
            this.tabUserReality = new TabPage();
            this.tabUserLeave = new TabPage();
            this.tabUserJobPostion = new TabPage();
            this.tabUserJobTitle = new TabPage();
            this.用户数据导入ToolStripMenuItem = new ToolStripMenuItem();
            this.menuStrip1.SuspendLayout();
            this.statusStrip1.SuspendLayout();
            this.ucSplitContainer1.BeginInit();
            this.ucSplitContainer1.Panel1.SuspendLayout();
            this.ucSplitContainer1.Panel2.SuspendLayout();
            this.ucSplitContainer1.SuspendLayout();
            this.tabControl1.SuspendLayout();
            base.SuspendLayout();
            this.menuStrip1.AutoSize = false;
            this.menuStrip1.Items.AddRange(new ToolStripItem[] { this.机构管理ToolStripMenuItem, this.人员审核ToolStripMenuItem1, this.人员管理ToolStripMenuItem, this.导入导出ToolStripMenuItem, this.文件管理FToolStripMenuItem, this.报表管理RToolStripMenuItem, this.基础数据管理ToolStripMenuItem, this.权限管理AToolStripMenuItem, this.系统管理ToolStripMenuItem, this.帮助ToolStripMenuItem });
            this.menuStrip1.Location = new Point(0, 0);
            this.menuStrip1.Name = "menuStrip1";
            this.menuStrip1.Size = new Size(0x3f0, 0x25);
            this.menuStrip1.TabIndex = 0;
            this.menuStrip1.Text = "menuStrip1";
            this.机构管理ToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.新增机构ToolStripMenuItem, this.修改机构UToolStripMenuItem, this.删除机构DToolStripMenuItem, this.机构审核ToolStripMenuItem, this.机构设置SToolStripMenuItem });
            this.机构管理ToolStripMenuItem.Name = "机构管理ToolStripMenuItem";
            this.机构管理ToolStripMenuItem.Size = new Size(0x54, 0x21);
            this.机构管理ToolStripMenuItem.Text = "机构管理(&O)";
            this.新增机构ToolStripMenuItem.Name = "新增机构ToolStripMenuItem";
            this.新增机构ToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.新增机构ToolStripMenuItem.Tag = "0101";
            this.新增机构ToolStripMenuItem.Text = "新增机构(&I)";
            this.新增机构ToolStripMenuItem.Click += new EventHandler(this.新增机构ToolStripMenuItem_Click);
            this.修改机构UToolStripMenuItem.Name = "修改机构UToolStripMenuItem";
            this.修改机构UToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.修改机构UToolStripMenuItem.Tag = "0102";
            this.修改机构UToolStripMenuItem.Text = "修改机构(&U)";
            this.修改机构UToolStripMenuItem.Click += new EventHandler(this.修改机构UToolStripMenuItem_Click);
            this.删除机构DToolStripMenuItem.Name = "删除机构DToolStripMenuItem";
            this.删除机构DToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.删除机构DToolStripMenuItem.Tag = "0103";
            this.删除机构DToolStripMenuItem.Text = "删除机构(&D)";
            this.删除机构DToolStripMenuItem.Click += new EventHandler(this.删除机构DToolStripMenuItem_Click);
            this.机构审核ToolStripMenuItem.Name = "机构审核ToolStripMenuItem";
            this.机构审核ToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.机构审核ToolStripMenuItem.Tag = "0104";
            this.机构审核ToolStripMenuItem.Text = "机构审核(&C)";
            this.机构审核ToolStripMenuItem.Click += new EventHandler(this.机构审核ToolStripMenuItem_Click);
            this.机构设置SToolStripMenuItem.Name = "机构设置SToolStripMenuItem";
            this.机构设置SToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.机构设置SToolStripMenuItem.Tag = "0105";
            this.机构设置SToolStripMenuItem.Text = "机构设置(&S)";
            this.机构设置SToolStripMenuItem.Click += new EventHandler(this.机构设置SToolStripMenuItem_Click);
            this.人员审核ToolStripMenuItem1.DropDownItems.AddRange(new ToolStripItem[] { this.人员添加IToolStripMenuItem, this.人员入编RToolStripMenuItem, this.基本信息修改UToolStripMenuItem, this.人员调动DToolStripMenuItem, this.人员任职TToolStripMenuItem, this.人员定岗PToolStripMenuItem, this.人员减少LToolStripMenuItem, this.人员排序SToolStripMenuItem, this.人员查询FToolStripMenuItem, this.打印PToolStripMenuItem });
            this.人员审核ToolStripMenuItem1.Name = "人员审核ToolStripMenuItem1";
            this.人员审核ToolStripMenuItem1.Size = new Size(0x53, 0x21);
            this.人员审核ToolStripMenuItem1.Text = "人员管理(&U)";
            this.人员添加IToolStripMenuItem.Name = "人员添加IToolStripMenuItem";
            this.人员添加IToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员添加IToolStripMenuItem.Tag = "0201";
            this.人员添加IToolStripMenuItem.Text = "人员添加(&I)";
            this.人员添加IToolStripMenuItem.Click += new EventHandler(this.btnAdd4_Click);
            this.人员入编RToolStripMenuItem.Name = "人员入编RToolStripMenuItem";
            this.人员入编RToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员入编RToolStripMenuItem.Tag = "0202";
            this.人员入编RToolStripMenuItem.Text = "人员入编(&R)";
            this.人员入编RToolStripMenuItem.Click += new EventHandler(this.人员入编RToolStripMenuItem_Click);
            this.基本信息修改UToolStripMenuItem.Name = "基本信息修改UToolStripMenuItem";
            this.基本信息修改UToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.基本信息修改UToolStripMenuItem.Tag = "0203";
            this.基本信息修改UToolStripMenuItem.Text = "人员修改(&U)";
            this.基本信息修改UToolStripMenuItem.Click += new EventHandler(this.btnUpdate4_Click);
            this.人员调动DToolStripMenuItem.Name = "人员调动DToolStripMenuItem";
            this.人员调动DToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员调动DToolStripMenuItem.Tag = "0204";
            this.人员调动DToolStripMenuItem.Text = "人员调动(&M)";
            this.人员调动DToolStripMenuItem.Click += new EventHandler(this.btnMove4_Click);
            this.人员任职TToolStripMenuItem.Name = "人员任职TToolStripMenuItem";
            this.人员任职TToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员任职TToolStripMenuItem.Tag = "0205";
            this.人员任职TToolStripMenuItem.Text = "人员任职(&T)";
            this.人员任职TToolStripMenuItem.Click += new EventHandler(this.btnUpdateJobTitle4_Click);
            this.人员定岗PToolStripMenuItem.Name = "人员定岗PToolStripMenuItem";
            this.人员定岗PToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员定岗PToolStripMenuItem.Tag = "0206";
            this.人员定岗PToolStripMenuItem.Text = "人员定岗(&P)";
            this.人员定岗PToolStripMenuItem.Click += new EventHandler(this.btnSetPos4_Click);
            this.人员减少LToolStripMenuItem.Name = "人员减少LToolStripMenuItem";
            this.人员减少LToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员减少LToolStripMenuItem.Tag = "0207";
            this.人员减少LToolStripMenuItem.Text = "人员减少(&L)";
            this.人员减少LToolStripMenuItem.Click += new EventHandler(this.btnDecrease4_Click);
            this.人员排序SToolStripMenuItem.Name = "人员排序SToolStripMenuItem";
            this.人员排序SToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员排序SToolStripMenuItem.Tag = "0208";
            this.人员排序SToolStripMenuItem.Text = "人员排序(&S)";
            this.人员排序SToolStripMenuItem.Click += new EventHandler(this.btnSort4_Click);
            this.人员查询FToolStripMenuItem.Name = "人员查询FToolStripMenuItem";
            this.人员查询FToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员查询FToolStripMenuItem.Tag = "0209";
            this.人员查询FToolStripMenuItem.Text = "人员查询(&F)";
            this.人员查询FToolStripMenuItem.Click += new EventHandler(this.人员查询FToolStripMenuItem_Click);
            this.打印PToolStripMenuItem.Name = "打印PToolStripMenuItem";
            this.打印PToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.打印PToolStripMenuItem.Tag = "0210";
            this.打印PToolStripMenuItem.Text = "打印(&P)";
            this.打印PToolStripMenuItem.Click += new EventHandler(this.btnPrint4_Click);
            this.人员管理ToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.人员审核ToolStripMenuItem, this.编制审核RToolStripMenuItem, this.任职审核ToolStripMenuItem, this.调动审核ToolStripMenuItem, this.定岗审核ToolStripMenuItem, this.减少审核ToolStripMenuItem });
            this.人员管理ToolStripMenuItem.Name = "人员管理ToolStripMenuItem";
            this.人员管理ToolStripMenuItem.Size = new Size(0x53, 0x21);
            this.人员管理ToolStripMenuItem.Text = "人员审核(&C)";
            this.人员审核ToolStripMenuItem.Name = "人员审核ToolStripMenuItem";
            this.人员审核ToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.人员审核ToolStripMenuItem.Tag = "0301";
            this.人员审核ToolStripMenuItem.Text = "人员审核(&B)";
            this.人员审核ToolStripMenuItem.Click += new EventHandler(this.人员审核ToolStripMenuItem_Click);
            this.编制审核RToolStripMenuItem.Name = "编制审核RToolStripMenuItem";
            this.编制审核RToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.编制审核RToolStripMenuItem.Tag = "0302";
            this.编制审核RToolStripMenuItem.Text = "入编审核(&R)";
            this.编制审核RToolStripMenuItem.Click += new EventHandler(this.编制审核RToolStripMenuItem_Click);
            this.任职审核ToolStripMenuItem.Name = "任职审核ToolStripMenuItem";
            this.任职审核ToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.任职审核ToolStripMenuItem.Tag = "0303";
            this.任职审核ToolStripMenuItem.Text = "任职审核(&T)";
            this.任职审核ToolStripMenuItem.Click += new EventHandler(this.任职审核ToolStripMenuItem_Click);
            this.调动审核ToolStripMenuItem.Name = "调动审核ToolStripMenuItem";
            this.调动审核ToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.调动审核ToolStripMenuItem.Tag = "0304";
            this.调动审核ToolStripMenuItem.Text = "调动审核(&M)";
            this.调动审核ToolStripMenuItem.Click += new EventHandler(this.调动审核ToolStripMenuItem_Click);
            this.定岗审核ToolStripMenuItem.Name = "定岗审核ToolStripMenuItem";
            this.定岗审核ToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.定岗审核ToolStripMenuItem.Tag = "0305";
            this.定岗审核ToolStripMenuItem.Text = "定岗审核(&P)";
            this.定岗审核ToolStripMenuItem.Click += new EventHandler(this.定岗审核ToolStripMenuItem_Click);
            this.减少审核ToolStripMenuItem.Name = "减少审核ToolStripMenuItem";
            this.减少审核ToolStripMenuItem.Size = new Size(0x8d, 0x16);
            this.减少审核ToolStripMenuItem.Tag = "0306";
            this.减少审核ToolStripMenuItem.Text = "减少审核(&L)";
            this.减少审核ToolStripMenuItem.Click += new EventHandler(this.减少审核ToolStripMenuItem_Click);
            this.导入导出ToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.机构数据ToolStripMenuItem, this.机构数据导出ToolStripMenuItem, this.用户数据导入ToolStripMenuItem });
            this.导入导出ToolStripMenuItem.Name = "导入导出ToolStripMenuItem";
            this.导入导出ToolStripMenuItem.Size = new Size(0x58, 0x21);
            this.导入导出ToolStripMenuItem.Text = "导入/导出(&D)";
            this.机构数据ToolStripMenuItem.Name = "机构数据ToolStripMenuItem";
            this.机构数据ToolStripMenuItem.Size = new Size(0xa3, 0x16);
            this.机构数据ToolStripMenuItem.Tag = "0401";
            this.机构数据ToolStripMenuItem.Text = "机构数据导入(&I)";
            this.机构数据ToolStripMenuItem.Click += new EventHandler(this.机构数据ToolStripMenuItem_Click);
            this.机构数据导出ToolStripMenuItem.Name = "机构数据导出ToolStripMenuItem";
            this.机构数据导出ToolStripMenuItem.Size = new Size(0xa3, 0x16);
            this.机构数据导出ToolStripMenuItem.Text = "机构数据导出(&O)";
            this.机构数据导出ToolStripMenuItem.Click += new EventHandler(this.机构数据导出ToolStripMenuItem_Click);
            this.文件管理FToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.文件ToolStripMenuItem });
            this.文件管理FToolStripMenuItem.Name = "文件管理FToolStripMenuItem";
            this.文件管理FToolStripMenuItem.Size = new Size(0x51, 0x21);
            this.文件管理FToolStripMenuItem.Text = "文件管理(&F)";
            this.文件ToolStripMenuItem.Name = "文件ToolStripMenuItem";
            this.文件ToolStripMenuItem.Size = new Size(0x88, 0x16);
            this.文件ToolStripMenuItem.Tag = "0501";
            this.文件ToolStripMenuItem.Text = "文件管理(&F)";
            this.文件ToolStripMenuItem.Click += new EventHandler(this.文件ToolStripMenuItem_Click);
            this.报表管理RToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.人员报表设计UToolStripMenuItem });
            this.报表管理RToolStripMenuItem.Name = "报表管理RToolStripMenuItem";
            this.报表管理RToolStripMenuItem.Size = new Size(0x52, 0x21);
            this.报表管理RToolStripMenuItem.Text = "报表管理(&R)";
            this.人员报表设计UToolStripMenuItem.Name = "人员报表设计UToolStripMenuItem";
            this.人员报表设计UToolStripMenuItem.Size = new Size(0xa2, 0x16);
            this.人员报表设计UToolStripMenuItem.Tag = "0601";
            this.人员报表设计UToolStripMenuItem.Text = "人员报表设计(&U)";
            this.人员报表设计UToolStripMenuItem.Click += new EventHandler(this.人员报表设计UToolStripMenuItem_Click);
            this.基础数据管理ToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.机构类型设置TToolStripMenuItem, this.机构类别设置ToolStripMenuItem, this.机构级别设置ToolStripMenuItem, this.机构性质设置ToolStripMenuItem, this.机构编码设置ToolStripMenuItem, this.职务设置ToolStripMenuItem, this.职称分类设置FToolStripMenuItem, this.职称设置ToolStripMenuItem, this.编制类别设置ToolStripMenuItem, this.人员职位设置ToolStripMenuItem, this.人员岗位设置ToolStripMenuItem });
            this.基础数据管理ToolStripMenuItem.Name = "基础数据管理ToolStripMenuItem";
            this.基础数据管理ToolStripMenuItem.Size = new Size(0x6a, 0x21);
            this.基础数据管理ToolStripMenuItem.Text = "基础数据管理(&B)";
            this.机构类型设置TToolStripMenuItem.Name = "机构类型设置TToolStripMenuItem";
            this.机构类型设置TToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.机构类型设置TToolStripMenuItem.Tag = "0801";
            this.机构类型设置TToolStripMenuItem.Text = "机构类型设置(&C)";
            this.机构类型设置TToolStripMenuItem.Click += new EventHandler(this.机构类型设置TToolStripMenuItem_Click);
            this.机构类别设置ToolStripMenuItem.Name = "机构类别设置ToolStripMenuItem";
            this.机构类别设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.机构类别设置ToolStripMenuItem.Tag = "0802";
            this.机构类别设置ToolStripMenuItem.Text = "机构类别设置(&T)";
            this.机构类别设置ToolStripMenuItem.Click += new EventHandler(this.机构类别设置ToolStripMenuItem_Click);
            this.机构级别设置ToolStripMenuItem.Name = "机构级别设置ToolStripMenuItem";
            this.机构级别设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.机构级别设置ToolStripMenuItem.Tag = "0803";
            this.机构级别设置ToolStripMenuItem.Text = "机构级别设置(&L)";
            this.机构级别设置ToolStripMenuItem.Click += new EventHandler(this.机构级别设置ToolStripMenuItem_Click);
            this.机构性质设置ToolStripMenuItem.Name = "机构性质设置ToolStripMenuItem";
            this.机构性质设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.机构性质设置ToolStripMenuItem.Tag = "0804";
            this.机构性质设置ToolStripMenuItem.Text = "机构性质设置(&R)";
            this.机构性质设置ToolStripMenuItem.Click += new EventHandler(this.机构性质设置ToolStripMenuItem_Click);
            this.机构编码设置ToolStripMenuItem.Name = "机构编码设置ToolStripMenuItem";
            this.机构编码设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.机构编码设置ToolStripMenuItem.Tag = "0805";
            this.机构编码设置ToolStripMenuItem.Text = "机构编码设置(&B)";
            this.机构编码设置ToolStripMenuItem.Click += new EventHandler(this.机构编码设置ToolStripMenuItem_Click);
            this.职务设置ToolStripMenuItem.Name = "职务设置ToolStripMenuItem";
            this.职务设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.职务设置ToolStripMenuItem.Tag = "0806";
            this.职务设置ToolStripMenuItem.Text = "人员职务设置(&P)";
            this.职务设置ToolStripMenuItem.Click += new EventHandler(this.职务设置ToolStripMenuItem_Click);
            this.职称分类设置FToolStripMenuItem.Name = "职称分类设置FToolStripMenuItem";
            this.职称分类设置FToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.职称分类设置FToolStripMenuItem.Tag = "0807";
            this.职称分类设置FToolStripMenuItem.Text = "人员职称分类设置(&F)";
            this.职称分类设置FToolStripMenuItem.Click += new EventHandler(this.职称分类设置FToolStripMenuItem_Click);
            this.职称设置ToolStripMenuItem.Name = "职称设置ToolStripMenuItem";
            this.职称设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.职称设置ToolStripMenuItem.Tag = "0808";
            this.职称设置ToolStripMenuItem.Text = "人员职称设置(&T)";
            this.职称设置ToolStripMenuItem.Click += new EventHandler(this.职称设置ToolStripMenuItem_Click);
            this.编制类别设置ToolStripMenuItem.Name = "编制类别设置ToolStripMenuItem";
            this.编制类别设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.编制类别设置ToolStripMenuItem.Tag = "0809";
            this.编制类别设置ToolStripMenuItem.Text = "人员编制类别设置(&S)";
            this.编制类别设置ToolStripMenuItem.Click += new EventHandler(this.编制类别设置ToolStripMenuItem_Click);
            this.人员职位设置ToolStripMenuItem.Name = "人员职位设置ToolStripMenuItem";
            this.人员职位设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.人员职位设置ToolStripMenuItem.Tag = "0810";
            this.人员职位设置ToolStripMenuItem.Text = "人员职位设置";
            this.人员岗位设置ToolStripMenuItem.Name = "人员岗位设置ToolStripMenuItem";
            this.人员岗位设置ToolStripMenuItem.Size = new Size(0xb8, 0x16);
            this.人员岗位设置ToolStripMenuItem.Tag = "0811";
            this.人员岗位设置ToolStripMenuItem.Text = "人员岗位设置";
            this.权限管理AToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.用户管理ToolStripMenuItem, this.角色管理ToolStripMenuItem });
            this.权限管理AToolStripMenuItem.Name = "权限管理AToolStripMenuItem";
            this.权限管理AToolStripMenuItem.Size = new Size(0x53, 0x21);
            this.权限管理AToolStripMenuItem.Text = "权限管理(&A)";
            this.用户管理ToolStripMenuItem.Name = "用户管理ToolStripMenuItem";
            this.用户管理ToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.用户管理ToolStripMenuItem.Tag = "0901";
            this.用户管理ToolStripMenuItem.Text = "用户管理(&A)";
            this.用户管理ToolStripMenuItem.Click += new EventHandler(this.用户管理ToolStripMenuItem_Click);
            this.角色管理ToolStripMenuItem.Name = "角色管理ToolStripMenuItem";
            this.角色管理ToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.角色管理ToolStripMenuItem.Tag = "0902";
            this.角色管理ToolStripMenuItem.Text = "角色管理(&R)";
            this.角色管理ToolStripMenuItem.Click += new EventHandler(this.角色管理ToolStripMenuItem_Click);
            this.系统管理ToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.日志ToolStripMenuItem, this.系统备份ToolStripMenuItem, this.系统恢复RToolStripMenuItem });
            this.系统管理ToolStripMenuItem.Name = "系统管理ToolStripMenuItem";
            this.系统管理ToolStripMenuItem.Size = new Size(0x51, 0x21);
            this.系统管理ToolStripMenuItem.Text = "系统管理(&S)";
            this.日志ToolStripMenuItem.Name = "日志ToolStripMenuItem";
            this.日志ToolStripMenuItem.Size = new Size(0x89, 0x16);
            this.日志ToolStripMenuItem.Tag = "1001";
            this.日志ToolStripMenuItem.Text = "系统日志(&L)";
            this.日志ToolStripMenuItem.Click += new EventHandler(this.日志ToolStripMenuItem_Click);
            this.系统备份ToolStripMenuItem.Name = "系统备份ToolStripMenuItem";
            this.系统备份ToolStripMenuItem.Size = new Size(0x89, 0x16);
            this.系统备份ToolStripMenuItem.Tag = "1002";
            this.系统备份ToolStripMenuItem.Text = "系统备份(&B)";
            this.系统备份ToolStripMenuItem.Click += new EventHandler(this.系统备份ToolStripMenuItem_Click);
            this.系统恢复RToolStripMenuItem.Name = "系统恢复RToolStripMenuItem";
            this.系统恢复RToolStripMenuItem.Size = new Size(0x89, 0x16);
            this.系统恢复RToolStripMenuItem.Tag = "1003";
            this.系统恢复RToolStripMenuItem.Text = "系统恢复(&R)";
            this.系统恢复RToolStripMenuItem.Click += new EventHandler(this.系统恢复RToolStripMenuItem_Click);
            this.帮助ToolStripMenuItem.DropDownItems.AddRange(new ToolStripItem[] { this.使用帮助ToolStripMenuItem, this.系统版本VToolStripMenuItem });
            this.帮助ToolStripMenuItem.Name = "帮助ToolStripMenuItem";
            this.帮助ToolStripMenuItem.Size = new Size(60, 0x21);
            this.帮助ToolStripMenuItem.Text = "帮助(H)";
            this.使用帮助ToolStripMenuItem.Name = "使用帮助ToolStripMenuItem";
            this.使用帮助ToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.使用帮助ToolStripMenuItem.Text = "使用帮助(&U)";
            this.使用帮助ToolStripMenuItem.Click += new EventHandler(this.使用帮助ToolStripMenuItem_Click);
            this.系统版本VToolStripMenuItem.Name = "系统版本VToolStripMenuItem";
            this.系统版本VToolStripMenuItem.Size = new Size(0x8a, 0x16);
            this.系统版本VToolStripMenuItem.Text = "系统版本(&V)";
            this.系统版本VToolStripMenuItem.Click += new EventHandler(this.系统版本VToolStripMenuItem_Click);
            this.statusStrip1.Items.AddRange(new ToolStripItem[] { this.toolStripStatusLabel1, this.lbCurrentUser, this.toolStripStatusLabel3, this.toolStripStatusLabel2, this.lbPath });
            this.statusStrip1.Location = new Point(0, 540);
            this.statusStrip1.Name = "statusStrip1";
            this.statusStrip1.Size = new Size(0x3f0, 0x16);
            this.statusStrip1.TabIndex = 3;
            this.statusStrip1.Text = "statusStrip1";
            this.toolStripStatusLabel1.BackColor = Color.Transparent;
            this.toolStripStatusLabel1.Name = "toolStripStatusLabel1";
            this.toolStripStatusLabel1.Size = new Size(0x43, 0x11);
            this.toolStripStatusLabel1.Text = "当前用户：";
            this.lbCurrentUser.BackColor = Color.Transparent;
            this.lbCurrentUser.Name = "lbCurrentUser";
            this.lbCurrentUser.Size = new Size(80, 0x11);
            this.lbCurrentUser.Text = "lbCurrentUser";
            this.toolStripStatusLabel3.BackColor = Color.Transparent;
            this.toolStripStatusLabel3.Name = "toolStripStatusLabel3";
            this.toolStripStatusLabel3.Size = new Size(0x1c, 0x11);
            this.toolStripStatusLabel3.Text = "   |   ";
            this.toolStripStatusLabel2.BackColor = Color.Transparent;
            this.toolStripStatusLabel2.Name = "toolStripStatusLabel2";
            this.toolStripStatusLabel2.Size = new Size(0x43, 0x11);
            this.toolStripStatusLabel2.Text = "当前机构：";
            this.lbPath.BackColor = Color.Transparent;
            this.lbPath.Name = "lbPath";
            this.lbPath.Size = new Size(0x29, 0x11);
            this.lbPath.Text = "lbPath";
            this.organTreeImageList.ImageStream = (ImageListStreamer)manager.GetObject("organTreeImageList.ImageStream");
            this.organTreeImageList.TransparentColor = Color.Transparent;
            this.organTreeImageList.Images.SetKeyName(0, "ADMIN.png");
            this.organTreeImageList.Images.SetKeyName(1, "business.png");
            this.organTreeImageList.Images.SetKeyName(2, "bg_work2.png");
            this.organTreeImageList.Images.SetKeyName(3, "bg_work.png");
            this.ucSplitContainer1.CollpasePanel = UCSplitContainer.SplitterPanelEnum.Panel1;
            this.ucSplitContainer1.Cursor = Cursors.Default;
            this.ucSplitContainer1.Dock = DockStyle.Fill;
            this.ucSplitContainer1.FixedPanel = FixedPanel.Panel1;
            this.ucSplitContainer1.Location = new Point(0, 0x25);
            this.ucSplitContainer1.Margin = new System.Windows.Forms.Padding(3, 30, 3, 3);
            this.ucSplitContainer1.Name = "ucSplitContainer1";
            this.ucSplitContainer1.Panel1.BackColor = SystemColors.Control;
            this.ucSplitContainer1.Panel1.Controls.Add(this.treeView1);
            this.ucSplitContainer1.Panel1.Padding = new System.Windows.Forms.Padding(5, 0, 0, 0);
            this.ucSplitContainer1.Panel1MinSize = 0;
            this.ucSplitContainer1.Panel2.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.ucSplitContainer1.Panel2.Controls.Add(this.tabControl1);
            this.ucSplitContainer1.Panel2.Padding = new System.Windows.Forms.Padding(0, 0, 5, 0);
            this.ucSplitContainer1.Panel2MinSize = 0;
            this.ucSplitContainer1.Size = new Size(0x3f0, 0x1f7);
            this.ucSplitContainer1.SplitterDistance = 250;
            this.ucSplitContainer1.SplitterWidth = 9;
            this.ucSplitContainer1.TabIndex = 4;
            this.treeView1.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.treeView1.BorderStyle = BorderStyle.FixedSingle;
            this.treeView1.Dock = DockStyle.Fill;
            this.treeView1.FullRowSelect = true;
            this.treeView1.HideSelection = false;
            this.treeView1.ImageIndex = 0;
            this.treeView1.ImageList = this.organTreeImageList;
            this.treeView1.ItemHeight = 0x10;
            this.treeView1.Location = new Point(5, 0);
            this.treeView1.Name = "treeView1";
            this.treeView1.PathSeparator = " -> ";
            this.treeView1.SelectedImageIndex = 0;
            this.treeView1.Size = new Size(0xf5, 0x1f7);
            this.treeView1.TabIndex = 0;
            this.treeView1.AfterSelect += new TreeViewEventHandler(this.treeView1_AfterSelect);
            this.tabControl1.Controls.Add(this.tabOrganReport);
            this.tabControl1.Controls.Add(this.tabPositionReport);
            this.tabControl1.Controls.Add(this.tabOrganConfig);
            this.tabControl1.Controls.Add(this.tabOrganBase);
            this.tabControl1.Controls.Add(this.tabUserReport);
            this.tabControl1.Controls.Add(this.tabUserReality);
            this.tabControl1.Controls.Add(this.tabUserLeave);
            this.tabControl1.Controls.Add(this.tabUserJobPostion);
            this.tabControl1.Controls.Add(this.tabUserJobTitle);
            this.tabControl1.Dock = DockStyle.Fill;
            this.tabControl1.Font = new Font("宋体", 9f, FontStyle.Regular, GraphicsUnit.Point, 0x86);
            this.tabControl1.ItemSize = new Size(0x48, 0x19);
            this.tabControl1.Location = new Point(0, 0);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new Size(0x2e8, 0x1f7);
            this.tabControl1.TabIndex = 1;
            this.tabControl1.SelectedIndexChanged += new EventHandler(this.tabControl1_SelectedIndexChanged);
            this.tabOrganReport.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabOrganReport.Location = new Point(4, 0x1d);
            this.tabOrganReport.Margin = new System.Windows.Forms.Padding(0);
            this.tabOrganReport.Name = "tabOrganReport";
            this.tabOrganReport.Padding = new System.Windows.Forms.Padding(3);
            this.tabOrganReport.Size = new Size(0x2e0, 470);
            this.tabOrganReport.TabIndex = 7;
            this.tabOrganReport.Text = " 统合报表 ";
            this.tabPositionReport.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabPositionReport.Location = new Point(4, 0x1d);
            this.tabPositionReport.Name = "tabPositionReport";
            this.tabPositionReport.Size = new Size(0x2e0, 470);
            this.tabPositionReport.TabIndex = 12;
            this.tabPositionReport.Text = " 岗位报表 ";
            this.tabOrganConfig.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabOrganConfig.Location = new Point(4, 0x1d);
            this.tabOrganConfig.Name = "tabOrganConfig";
            this.tabOrganConfig.Size = new Size(0x2e0, 470);
            this.tabOrganConfig.TabIndex = 13;
            this.tabOrganConfig.Text = " 岗位设置 ";
            this.tabOrganBase.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabOrganBase.Location = new Point(4, 0x1d);
            this.tabOrganBase.Name = "tabOrganBase";
            this.tabOrganBase.Size = new Size(0x2e0, 470);
            this.tabOrganBase.TabIndex = 0;
            this.tabOrganBase.Text = " 基本情况 ";
            this.tabUserReport.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabUserReport.Location = new Point(4, 0x1d);
            this.tabUserReport.Margin = new System.Windows.Forms.Padding(0);
            this.tabUserReport.Name = "tabUserReport";
            this.tabUserReport.Size = new Size(0x2e0, 470);
            this.tabUserReport.TabIndex = 9;
            this.tabUserReport.Text = " 人员报表 ";
            this.tabUserReality.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabUserReality.Location = new Point(4, 0x1d);
            this.tabUserReality.Name = "tabUserReality";
            this.tabUserReality.Size = new Size(0x2e0, 470);
            this.tabUserReality.TabIndex = 3;
            this.tabUserReality.Text = " 实有人员 ";
            this.tabUserLeave.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabUserLeave.Location = new Point(4, 0x1d);
            this.tabUserLeave.Name = "tabUserLeave";
            this.tabUserLeave.Size = new Size(0x2e0, 470);
            this.tabUserLeave.TabIndex = 5;
            this.tabUserLeave.Text = " 减少人员 ";
            this.tabUserJobPostion.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabUserJobPostion.Location = new Point(4, 0x1d);
            this.tabUserJobPostion.Name = "tabUserJobPostion";
            this.tabUserJobPostion.Size = new Size(0x2e0, 470);
            this.tabUserJobPostion.TabIndex = 10;
            this.tabUserJobPostion.Text = " 职位变动 ";
            this.tabUserJobTitle.BackColor = Color.FromArgb(0xa4, 0xc4, 0xeb);
            this.tabUserJobTitle.Location = new Point(4, 0x1d);
            this.tabUserJobTitle.Name = "tabUserJobTitle";
            this.tabUserJobTitle.Size = new Size(0x2e0, 470);
            this.tabUserJobTitle.TabIndex = 11;
            this.tabUserJobTitle.Text = " 职称变动 ";
            this.用户数据导入ToolStripMenuItem.Name = "用户数据导入ToolStripMenuItem";
            this.用户数据导入ToolStripMenuItem.Size = new Size(0xa3, 0x16);
            this.用户数据导入ToolStripMenuItem.Text = "用户数据导入(U)";
            this.用户数据导入ToolStripMenuItem.Click += new EventHandler(this.用户数据导入ToolStripMenuItem_Click);
            base.AutoScaleDimensions = new SizeF(6f, 12f);
            base.AutoScaleMode = AutoScaleMode.Font;
            this.BackColor = Color.White;
            base.ClientSize = new Size(0x3f0, 0x232);
            base.Controls.Add(this.ucSplitContainer1);
            base.Controls.Add(this.menuStrip1);
            base.Controls.Add(this.statusStrip1);
            this.DoubleBuffered = true;
            base.EnableGlass = false;
            base.Icon = (Icon)manager.GetObject("$this.Icon");
            base.MainMenuStrip = this.menuStrip1;
            base.Name = "FrmMain";
            base.StartPosition = FormStartPosition.CenterScreen;
            this.Text = "人事管理系统";
            base.WindowState = FormWindowState.Maximized;
            base.FormClosing += new FormClosingEventHandler(this.FrmMain_FormClosing);
            base.Load += new EventHandler(this.FrmMain_Load);
            this.menuStrip1.ResumeLayout(false);
            this.menuStrip1.PerformLayout();
            this.statusStrip1.ResumeLayout(false);
            this.statusStrip1.PerformLayout();
            this.ucSplitContainer1.Panel1.ResumeLayout(false);
            this.ucSplitContainer1.Panel2.ResumeLayout(false);
            this.ucSplitContainer1.EndInit();
            this.ucSplitContainer1.ResumeLayout(false);
            this.tabControl1.ResumeLayout(false);
            base.ResumeLayout(false);
            base.PerformLayout();
        }

        private void LoadForm()
        {
            if (this.activeForm != null)
            {
                this.activeForm.Close();
                this.activeForm = null;
            }
            if (this.activeOrganID != 0)
            {
                switch (this.activeTabPage.Name)
                {
                    case "tabOrganReport":
                        this.activeForm = new PMS.Client.FrmOrgan.FrmReport(this.activeOrganID);
                        break;

                    case "tabPositionReport":
                        this.activeForm = new PMS.Client.FrmUserPositionLevel.FrmReport(this.activeOrganID);
                        break;

                    case "tabOrganConfig":
                        this.activeForm = new FrmPositionConfigReport(this.activeOrganID, this.activeOrganName);
                        break;

                    case "tabOrganBase":
                        this.activeForm = new PMS.Client.FrmOrgan.FrmDetail(this.activeOrganID);
                        break;

                    case "tabUserReport":
                        this.activeForm = new PMS.Client.FrmUser.FrmReport(this.activeOrganID);
                        break;

                    case "tabUserReality":
                        this.activeForm = new PMS.Client.FrmUser.FrmList(this.activeOrganID, this.activeOrganName, false);
                        break;

                    case "tabUserLeave":
                        this.activeForm = new PMS.Client.FrmUserLeave.FrmList(this.activeOrganID, this.activeOrganName, true);
                        break;

                    case "tabUserJobPostion":
                        this.activeForm = new PMS.Client.FrmUserJobPosition.FrmReport(this.activeOrganID, this.activeOrganName);
                        break;

                    case "tabUserJobTitle":
                        this.activeForm = new PMS.Client.FrmUserJobTitle.FrmReport(this.activeOrganID, this.activeOrganName);
                        break;
                }
                if (this.activeForm != null)
                {
                    this.activeForm.TopLevel = false;
                    this.activeForm.Parent = this.tabControl1.TabPages[this.activeTabPage.Name];
                    this.activeForm.FormBorderStyle = FormBorderStyle.None;
                    this.activeForm.WindowState = FormWindowState.Normal;
                    this.activeForm.Dock = DockStyle.Fill;
                    this.activeForm.KeyPreview = true;
                    this.activeForm.Show();
                    this.activeForm.Focus();
                }
            }
        }

        private void LoadOrganTree()
        {
            this.organList = this.organAuthorityBLL.GetList(PMS.Common.Keys.Admin.AdminID);
            if (this.organList == null)
            {
                this.organList = new List<AuthorityOrgan>();
            }
            PMS.Common.Keys.AuthorityOrganList = this.organList;
            this.treeView1.Nodes.Clear();
            this.ReturnLoadOrganTree(this.treeView1.Nodes, 0);
            if (this.treeView1.Nodes.Count > 0)
            {
                this.treeView1.Nodes[0].Expand();
            }
        }

        private void LoadPath()
        {
            this.lbPath.Text = this.treeView1.SelectedNode.FullPath;
        }

        private void LoadToolStripMenu()
        {
        }

        private void MenuAuthority()
        {
            List<RoleMenu> list = new RoleMenuBLL().GetList(PMS.Common.Keys.Admin.RoleID);
            list = (list == null) ? new List<RoleMenu>() : list;
            foreach (ToolStripMenuItem item in this.menuStrip1.Items)
            {
                IEnumerator enumerator2 = item.DropDownItems.GetEnumerator();
                Predicate<RoleMenu> match = null;
                ToolStripMenuItem item2;
                while (enumerator2.MoveNext())
                {
                    item2 = (ToolStripMenuItem)enumerator2.Current;
                    if (item2.Tag != null)
                    {
                        if (match == null)
                        {
                            match = f => f.MenuCode == item2.Tag.ToString();
                        }
                        item2.Enabled = list.Exists(match);
                    }
                }
            }
        }

        private string ReturnGetNodeText(TreeNode node)
        {
            if (node.Parent != null)
            {
                return (this.ReturnGetNodeText(node.Parent) + " -> " + node.Text);
            }
            return node.Text;
        }

        private void ReturnLoadOrganTree(TreeNodeCollection nodes, int parentID)
        {
            List<AuthorityOrgan> list = this.organList.FindAll(delegate(AuthorityOrgan f)
            {
                int? nullable1 = f.ParentID;
                int num = parentID;
                return (nullable1.GetValueOrDefault() == num) && nullable1.HasValue;
            });
            if (list.Count > 0)
            {
                foreach (AuthorityOrgan organ in list)
                {
                    TreeNode node2 = new TreeNode
                    {
                        Name = organ.OrganID.ToString(),
                        Tag = organ,
                        Text = organ.OrganName,
                        ImageIndex = organ.IsOffice - 1,
                        SelectedImageIndex = organ.IsOffice - 1
                    };
                    TreeNode node = node2;
                    nodes.Add(node);
                    this.ReturnLoadOrganTree(node.Nodes, organ.OrganID);
                }
            }
        }

        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            this.activePanelIndex = this.tabControl1.SelectedIndex;
            this.activeTabPage = this.tabControl1.SelectedTab;
            this.LoadToolStripMenu();
            this.LoadForm();
        }

        private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            AuthorityOrgan tag = (AuthorityOrgan)this.treeView1.SelectedNode.Tag;
            if (tag.IsAuthority == 1)
            {
                this.activeNode = this.treeView1.SelectedNode;
                this.activeOrganName = this.activeNode.Text;
                this.activeOrganID = int.Parse(this.activeNode.Name);
                this.activeOrganLevelNo = tag.LevelNo.Value;
            }
            else
            {
                this.activeNode = this.treeView1.SelectedNode;
                this.activeOrganName = "";
                this.activeOrganID = 0;
                this.activeOrganLevelNo = 0;
            }
            this.LoadPath();
            this.LoadForm();
        }

        private void 编制类别设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmUserBuild.FrmList list = new PMS.Client.FrmUserBuild.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 编制审核RToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmUserRegistLogList list = new FrmUserRegistLogList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void 定岗审核ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmPositionLevelLogList list = new FrmPositionLevelLogList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void 机构编码设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmOrganBuild.FrmList list = new PMS.Client.FrmOrganBuild.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 机构级别设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmOrganLevel.FrmList list = new PMS.Client.FrmOrganLevel.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 机构类别设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmOrganType.FrmList list = new PMS.Client.FrmOrganType.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 机构类型设置TToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmOrganType.FrmList list = new PMS.Client.FrmOrganType.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 机构设置SToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmOrganConfig config = new FrmOrganConfig(this.activeOrganID);
            config.ShowDialog();
            if (config.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 机构审核ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmOrganCheck check = new FrmOrganCheck();
            check.ShowDialog();
            if (check.DialogResult == DialogResult.OK)
            {
                this.LoadOrganTree();
            }
        }

        private void 机构数据ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new FrmOrganDataImport().ShowDialog();
        }

        private void 机构数据导出ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new FrmOrganDataExport().ShowDialog();
        }

        private void 机构性质设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmOrganRole.FrmList list = new PMS.Client.FrmOrganRole.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 减少审核ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmUserLeave.FrmLogList list = new PMS.Client.FrmUserLeave.FrmLogList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void 角色管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmRoleList list = new FrmRoleList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
                this.LoadOrganTree();
            }
        }

        private void 人员报表设计UToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new FrmReportList().ShowDialog();
        }

        private void 人员查询FToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmFind find = new FrmFind();
            find.ShowDialog();
            if (find.DialogResult == DialogResult.OK)
            {
                if (this.activeForm != null)
                {
                    this.activeForm.Close();
                    this.activeForm = null;
                }
                this.activeForm = new PMS.Client.FrmUser.FrmList(find.Keywords);
                if (this.activeForm != null)
                {
                    this.activeForm.TopLevel = false;
                    this.activeForm.Parent = this.tabControl1.TabPages[this.activePanelIndex];
                    this.activeForm.FormBorderStyle = FormBorderStyle.None;
                    this.activeForm.WindowState = FormWindowState.Normal;
                    this.activeForm.Dock = DockStyle.Fill;
                    this.activeForm.KeyPreview = true;
                    this.activeForm.Show();
                    this.activeForm.Focus();
                }
            }
        }

        private void 人员入编RToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmSearch search = new FrmSearch();
            search.ShowDialog();
            if (search.DialogResult == DialogResult.OK)
            {
                int userID = search.User.UserID;
                if (userID < 1)
                {
                    MessageBox.Show("请选择人员！");
                }
                else
                {
                    FrmUpdateRegist regist = new FrmUpdateRegist(userID);
                    regist.ShowDialog();
                    if (regist.DialogResult == DialogResult.OK)
                    {
                        this.LoadForm();
                    }
                }
            }
        }

        private void 人员审核ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmBaseInfoLogList list = new FrmBaseInfoLogList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void 任职审核ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FrmJobPostionLogList list = new FrmJobPostionLogList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void 日志ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new PMS.Client.FrmSyslog.FrmList().ShowDialog();
        }

        private void 删除机构DToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (MessageBox.Show("确定删除机构?", "警告", MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation) == DialogResult.OK)
            {
                OrganChangeLogBLL gbll = new OrganChangeLogBLL();
                OrganChangeLog log2 = new OrganChangeLog
                {
                    OrganID = this.activeOrganID,
                    LogType = "删除",
                    CheckedState = "未审核"
                };
                OrganChangeLog model = log2;
                if (gbll.Add(model) > 0)
                {
                    MessageBox.Show("删除机构申请已提交，等待审核中！");
                }
            }
        }

        private void 使用帮助ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            try
            {
                Process.Start(Application.StartupPath + "//Document//Help.doc");
            }
            catch (Exception exception)
            {
                PMS.Common.Log.Write(exception.Message);
                MessageBox.Show("打开文件失败");
            }
        }

        private void 调动审核ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmUserMove.FrmLogList list = new PMS.Client.FrmUserMove.FrmLogList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
                this.LoadForm();
            }
        }

        private void 文件ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new PMS.Client.FrmFile.FrmList().ShowDialog();
        }

        private void 系统版本VToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new FrmVersion().ShowDialog();
        }

        private void 系统备份ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new PMS.Client.FrmBackup.FrmList().ShowDialog();
        }

        private void 系统恢复RToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new PMS.Client.FrmBackup.FrmList().ShowDialog();
        }

        private void 新增机构ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmOrgan.FrmAdd add = new PMS.Client.FrmOrgan.FrmAdd();
            add.ShowDialog();
            if (add.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 修改机构UToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmOrgan.FrmUpdate update = new PMS.Client.FrmOrgan.FrmUpdate(this.activeOrganID);
            update.ShowDialog();
            if (update.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 用户管理ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmAdmin.FrmList list = new PMS.Client.FrmAdmin.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
                this.LoadOrganTree();
            }
        }

        private void 用户数据导入ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            new FrmUserDataImport().ShowDialog();
        }

        private void 职称分类设置FToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmJobTitleType.FrmList list = new PMS.Client.FrmJobTitleType.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 职称设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmJobTitle.FrmList list = new PMS.Client.FrmJobTitle.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }

        private void 职务设置ToolStripMenuItem_Click(object sender, EventArgs e)
        {
            PMS.Client.FrmUserJobPosition.FrmList list = new PMS.Client.FrmUserJobPosition.FrmList();
            list.ShowDialog();
            if (list.DialogResult == DialogResult.OK)
            {
            }
        }
    }
}

